set(ZLIB_SRC_DIR ${PROJECT_ROOT}/lib/zlib)
set(ZLIB_INC_DIR ${PROJECT_ROOT}/lib/zlib)

qelib_include_directories(${ZLIB_INC_DIR})

qelib_sources(
    ${ZLIB_SRC_DIR}/adler32.c
    ${ZLIB_SRC_DIR}/compress.c
    ${ZLIB_SRC_DIR}/crc32.c
    ${ZLIB_SRC_DIR}/deflate.c
    ${ZLIB_SRC_DIR}/gzclose.c
    ${ZLIB_SRC_DIR}/gzlib.c
    ${ZLIB_SRC_DIR}/gzread.c
    ${ZLIB_SRC_DIR}/gzwrite.c
    ${ZLIB_SRC_DIR}/infback.c
    ${ZLIB_SRC_DIR}/inffast.c
    ${ZLIB_SRC_DIR}/inflate.c
    ${ZLIB_SRC_DIR}/inftrees.c
    ${ZLIB_SRC_DIR}/uncompr.c
    ${ZLIB_SRC_DIR}/trees.c
    ${ZLIB_SRC_DIR}/zutil.c
)

qelib_install_headers_ifdef(
    CONFIG_LIBZLIB
    ${ZLIB_INC_DIR}/zlib.h
)